package com.zbkj.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbkj.dal.entity.user.UserQuotaAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author JinXinyu
 * @date 2024-02-08 15:08:52
 */
@Mapper
public interface UserQuotaAccountDao extends BaseMapper<UserQuotaAccount> {

    int batchInsert(@Param("userList") List<UserQuotaAccount> userList);

//    @Update("update eb_user_quota_account f set f.quota_total = f.quota_total + :amount, " +
//            "f.quota_balance = f.quota_balance + :amount, f.update_time = current_time " +
//            "where f.quota_account = :quotaAccount and f.is_deleted = 0 and f.is_enable = 1")
//    void addQuota(@Param("amount") BigDecimal amount, @Param("quotaAccount") String quotaAccount);

}
